package com.ss.android.wenda.answer.list;

import com.ss.android.common.callback.SSCallback;
import com.ss.android.wenda.model.Answer;
import com.ss.android.wenda.model.Question;
import java.util.Iterator;

final class f implements SSCallback {
    private final AnswerListFragment a;

    f(AnswerListFragment arg1) {
        this.a = arg1;

    }

    public final Object onCallback(Object[] args) {
        Object v4 = null;
        if(args != null && args.length >= 0 && !this.a.isDestroyed()) {
            String v2 = args[0].toString();
            Iterator v3 = AnswerListFragment.a(this.a).b.iterator();
            int v0;
            do {
                if(v3.hasNext()) {
                    if(! android.support.design.a.isTextEquals(v2,((Answer)v3.next()).getAnswerId())) {
                        continue;
                    }

                    v3.remove();
                    v0 = 1;
                } else {
                    v0 = 0;
                }
                break;
            }
            while(true);
            if(v0 != 0) {
                AnswerListFragment.a(this.a).notifyDataSetChanged();
                return v4;
            }

            Question v0_1 = AnswerListFragment.b(this.a);
            --((Question)v0_1).mNormalAnswerCount;
            if(AnswerListFragment.b(this.a).mNormalAnswerCount == 0) {
                AnswerListFragment.c(this.a);
                return v4;
            }

            AnswerListFragment.d(this.a);
            AnswerListFragment.e(this.a).a(AnswerListFragment.b(this.a));
        }

        return v4;
    }
}

